Non-contact probe

ABSTRACT

A non-contact measurement apparatus and method. A probe is provided for mounting on a coordinate positioning apparatus, comprising at least one imaging device for capturing an image of an object to be measured. Also provided is an image analyzer configured to analyze at least one first image of an object obtained by the probe from a first perspective and at least one second image of the object obtained by the probe from a second perspective so as to identify at least one target feature on the object to be measured. The image analyzer is further configured to obtain topographical data regarding a surface of the object via analysis of an image, obtained by the probe, of the object on which an optical pattern is projected.

This invention relates to a method and apparatus for measuring an objectwithout contacting the object.

Photogrammetry is a known technique for determining the location ofcertain points on an object from photographs taken at differentperspectives, i.e. positions and/or orientations. Typicallyphotogrammetry comprises obtaining at least two images of an objecttaken from two different perspectives. For each image the twodimensional coordinates of a feature of the object on the image candetermined. It is then possible from the knowledge of the relativelocation and orientation of the camera(s) which took the images, and thepoints at which the feature is formed on the images to determine thethree dimensional coordinates of the feature on the object viatriangulation. Such a technique is disclosed for example in U.S. Pat.No. 5,251,156 the entire content of which is incorporated into thisspecification by this reference.

Non-contact optical measuring systems are also known for measuring thetopography of a surface. These may typically consist of a projectorwhich projects a structured light pattern onto a surface and a camera,set at an angle to the projector, which detects the structured lightpattern on the surface. Height variation on the surface causes adistortion in the pattern. From this distortion the geometry of thesurface can be calculated via triangulation and/or phase analysistechniques.

Current known systems enable either photogrammetry or phase analysis tobe performed in order to obtain measurement data regarding the object.

The invention provides a method and apparatus in which measurement of anobject via photogrammetric techniques and triangulation and/or phaseanalysis techniques can be performed on images obtained by a commonprobe.

According to a first aspect of the invention there is provided, anon-contact measurement apparatus, comprising: a probe for mounting on acoordinate positioning apparatus, comprising at least one imaging devicefor capturing an image of an object to be measured; an image analyserconfigured to analyse at least one first image of an object obtained bythe probe from a first perspective and at least one second image of theobject obtained by the probe from a second perspective so as to identifyat least one target feature on the object to be measured, and furtherconfigured to obtain topographical data regarding a surface of theobject via analysis of an image, obtained by the probe, of the object onwhich an optical pattern is projected.

It is an advantage of the present invention that both the position oftarget features on the object, and the topographical data of the surfaceof the object are determined by the image analyser using images obtainedby the same probe. Accordingly, it is not necessary to have two separateimaging systems for obtaining both the position of target features of anobject and the topographical form of the surface of the object.

As will be understood, a perspective can be a particular view point ofthe object. A perspective can be defined by the position and/ororientation of the imaging device relative to the object.

The at least one first image and the at least one second image can beobtained by at least one suitable imaging device. Suitable imagingdevices can comprise at least one image sensor. For example, suitableimaging devices can comprise an optical electromagnetic radiation (EMR)sensitive detector, such as a charge-coupled device (CCD), acomplementary metal-oxide-semiconductor (CMOS). Suitable imaging devicescan be optically configured to focus light at the image plane. As willbe understood, the image plane can be defined by the image sensor. Forexample, suitable imaging devices can comprise at least one opticalcomponent configured to focus optical EMR at the image plane.Optionally, the at least one optical component comprises a lens.

Suitable imaging devices can be based on the pinhole camera model whichconsists of a pinhole, which can also be referred to as the imagingdevice's perspective centre, through which optical EMR rays are assumedto pass before intersecting with the image plane. As will be understood,imaging devices that do not comprise a pinhole but instead comprise alens to focus optical EMR also have a perspective centre and this can bethe point through which all optical EMR rays that intersect with theimage plane are assumed to pass.

As will be understood, the perspective centre can be found relative tothe image sensor using a calibration procedure, such as those describedin J. Heikkila and O. Silven, “A four-step camera calibration procedurewith implicit image correction”, Proceedings of the 1997 Conference inComputer Vision and Pattern Recognition (CVPR '97) and J. G Fryer,“Camera Calibration” in K. B. Atkinson (ed.) “Close range photogrammetryand machine vision”, Whittles publishing (1996). Correction parameterssuch as those for correcting lens aberrations can be provided and arewell known and are for instance described in these two documents.

The probe can comprise a plurality of imaging devices. Preferably, theimages analysed by the image analyser are obtained using a commonimaging device. Accordingly, in this case the probe can comprise asingle imaging device only.

Preferably the optical pattern is projected over an area of the object.Preferably the pattern extends over an area of the object so as tofacilitate the measurement of a plurality of points of the object overthe area image. Preferably the pattern is a substantially repetitivepattern. Particularly preferred optical patterns comprise substantiallyperiodic optical patterns. As will be understood, a periodic opticalpattern can be a pattern which repeats after a certain finite distance.The minimum distance between repetitions can be the period of thepattern. Preferably the optical pattern is periodic in at least onedimension. Optionally, the optical pattern can be periodic in at leasttwo perpendicular dimensions.

Suitable optical patterns for use with the present invention includepatterns of concentric circles, patterns of lines of varying colour,shades, and/or tones. The colour, shades and/or tones could alternatebetween two or more different values. Optionally, the colour, shadeand/or tones could vary between a plurality of discrete values.Preferably, the colour, shade and/or tones varies continuously acrossthe optical pattern. Preferably, the optical pattern is a fringepattern. For example, the optical pattern can be a set of sinusoidalfringes. The optical pattern can be in the infrared to ultravioletrange. Preferably, the optical pattern is a visible optical pattern. Aswill be understood, an optical pattern for use in methods such as thatof the present invention is also commonly referred to as a structuredlight pattern.

The optical pattern could be projected onto the object via at least oneprojector. Suitable projectors for the optical pattern include a digitallight projector configured to project an image input from a processordevice. Such a projector enables the pattern projected to be changed.Suitable projectors could comprise a light source and one or morediffraction gratings arranged to produce the optical pattern. Thediffraction grating(s) could be moveable so as to enable the patternprojected by the projector to be changed. For instance, the diffractiongrating(s) can be mounted on a piezoelectric transducer. Optionally, thediffraction gratings could be fixed such that the pattern projected bythe projector cannot be changed. Optionally the projector could comprisea light source and a hologram. Further, the projector could comprise alight source and a patterned slide. Further still, the projector couldcomprise two mutually coherent light sources. The coherent light sourcescould be moveable so as to enable the pattern projected by the projectorto be changed. For instance, the coherent light sources can be mountedon a piezoelectric transducer. Optionally, the coherent light sourcescould be fixed such that the pattern projected by the projector cannotbe changed.

The at least one projector could be provided separately to the probe.Preferably, the probe comprises the at least one projector. Preferablythe probe comprises a single projector only.

A target feature can be a predetermined mark on the object. Thepredetermined mark could be a part of the object, for example apredetermined pattern formed on the object's surface. Optionally, themark could be attached to the object for the purpose of identifying atarget feature. For example, the mark could be a coded “bull's eye”,wherein the “bull's-eye” has a unique central point which is invariantwith perspective, surrounded by a set of concentric black and whiterings which code a unique identifier. Automatic feature recognitionmethods can be used to both locate the centre of the target and alsodecode the unique identifier. By means of such targets the images can beautomatically analysed and the coordinates of the “bull's-eye” centrereturned.

As will be understood, the image analyser could be configured toanalyser further images of the object being obtained from further knownperspectives that are different to the perspectives of the other images.The more images that are analysed the more accurate and reliable theposition determination of the target feature on the object can be.

A target feature on the object to be measured can be identified byfeature recognition techniques. For example, a Hough Transform can beused to identify a straight line feature on the object.

At least one of the at least one first image and at least second imagecan be an image of the object onto which an optical pattern isprojected. The optical pattern need not be the same as the imagedoptical pattern used for obtaining topographical data. Preferably, theat least one first image and at least second image are images of theobject onto which an optical pattern is projected. This enablestopographical data to be obtained from at least one of the at least onefirst and at least one second image.

Preferably, the image analyser is configured to identify an irregularityin the optical pattern in each of the first and second images as the atleast one target feature. This is advantageous as target features can beidentified without the use of markers placed on the object. This hasbeen found to enable highly accurate measurements of the object to betaken quickly. It has also been found that the method of the inventioncan require less processing resources to identify points on complexshaped objects than by other known image processing techniques.

As will be understood, an irregularity in the optical pattern can alsobe referred to as discontinuity in the optical pattern.

An irregularity in the optical pattern can be a deformation of theoptical pattern caused by a discontinuous feature on the object. Such adeformation of the optical pattern can, for example, be caused at theboundary between two continuous sections of an object. For instance, theboundary could be the edge of a cube at which two faces of the cubemeet. Accordingly, a discontinuous feature on the object can be wherethe gradient of the surface of the object changes significantly. Thegreater the gradient of the surface relative to the optical patternprojector, the greater the deformation of the optical pattern at thatpoint on the surface. Accordingly, an irregularity could be identifiedby identifying those points on the object at which the optical patternis deformed by more than a predetermined threshold. This predeterminedthreshold will depend on a number of factors, including the size andshape of the object to be measured. Optionally, the predeterminedthreshold can be determined and set prior to operation by a user basedon the knowledge of the object to be measured.

An irregularity can be can be identified by identifying in an imagethose points on the object at which the rate of change of the opticalpattern is greater than a predetermined threshold rate of change. Forinstance, in embodiments in which the optical pattern is a periodicoptical pattern, an irregularity can be identified by identifying in animage those points on the object at which the rate of change of thephase of the periodic optical pattern is greater than a predeterminedthreshold rate of change. In particular, in embodiments in which theoptical pattern is a fringe pattern, an irregularity can be identifiedby identifying in an image those points on the object at which the rateof change of the phase of the fringe pattern is greater than apredetermined threshold rate of change.

The rate of change of the phase of an optical pattern as imaged whenprojected onto an object can be identified by creating a phase map fromthe image, and then looking for jumps in the phase between adjacentpoints in the phase map above a predetermined threshold. As will beunderstood, a phase map is a map which contains the phase a patternprojected onto the object's surface for a plurality of pixels in animage. The phase map could be a wrapped phase map. The phase map couldbe an unwrapped phase map. Known techniques can be used to unwrap awrapped phase map in order to obtain an unwrapped phase map.

A phase map can be created from a single image of the optical patternobject. For example, Fourier Transform techniques could be used tocreate the phase map.

Preferably a phase map is created from a set of images of the objectfrom substantially the same perspective, in which the position of theoptical pattern on the object is different for each image. Accordingly,a phase map can be created using a phase stepping approach. This canprovide a more accurate phase map. Phase stepping algorithms known andare for example described in Creath, K. “Comparison of phase measurementalgorithms” Proc. SPIE 680, 19-28 (1986). Accordingly, the method cancomprise obtaining a set of first images of the optical pattern on theobject from the first perspective. The method can further compriseobtaining a set of second images of the optical pattern on the objectfrom the second perspective. A set of images can comprise a plurality ofimages of the object from a given perspective. Preferably, a set ofimages comprises at least two images, more preferably at least threeimages, especially preferably at least four images. The position (e.g.phase) of the optical pattern on the object can be different for eachimage in a set.

The image analyser can be configured to process: a set of first imagesobtained from the first known perspective, the position of the opticalpattern on the object being different for each image in the set; and aset of second images obtained from the second known perspective, theposition of the optical pattern on the object being different for eachimage in the set in order to identify at least one target feature on theobject to be measured and to determine the position of the targetfeature on the object relative to the image sensor.

Further details of a method of identifying an irregularity in theoptical pattern in each of the at least one first and second images as atarget feature are disclosed in the co-pending PCT application filed onthe same day as the present application with the title NON-CONTACTMEASUREMENT APPARATUS AND METHOD and having the applicant's referencenumber 741/WO/0 and claiming priority from UK Patent Application nos.0716080.7, 0716088.0, 0716109.4. Subject matter that is disclosed inthat application is incorporated in the specification of the presentapplication by this reference.

As will be understood, topographical data can be data indicating thetopography of at least a part of the object's surface. The topographicaldata can be data indicating the height of the object's surface at leastone point on the object, and preferably at a plurality of points acrossthe object. The topographical data can be data indicating the gradientof the object's surface, at least one point on the object, andpreferably at a plurality of points across the object. The topographicaldata can be data indicating the height and/or gradient of the object'ssurface relative to the image sensor.

The topographical data can be obtained via analysing the opticalpattern. For instance, the topographical data can be obtained viaanalysing the deformation of the optical pattern. This can be done forexample via triangulation techniques. Optionally, the topographical datacan be obtained via analysing the optical pattern using phase analysistechniques.

The at least one image processed by the imager analyser to obtaintopographical data can be a separate image from the at least one firstand at least one second images. Optionally, the topographical dataregarding the surface on which the optical pattern is projected can beobtained from at least one of the at least one first and at least onesecond images. Accordingly, at least one of the at least one first andat least one second images can be an image of the object on which aoptical pattern is projected.

The image analyser could be configured to generate a phase map from atleast one of the plurality of images. The image analyser could beconfigured to generate a phase map from at least one of the at least onefirst image and at least one second image. The phase map could begenerated by Fourier Transforming one of the plurality of images.

The image analyser can be configured to process a set of images in whichthe position of an optical pattern on the object is different for eachimage in the set in order to determine the topographical data.Optionally, as described above, a phase map can be created from a set ofimages of the object from the same perspective, in which the position(e.g. phase) of the optical pattern at the object is different for eachimage.

In particular, the image analyser can be configured to process at leastone of the first or second sets of images in order to determine thetopographical data. Accordingly, the image analyser can be configured toprocess at least one of: a set of first images obtained from the firstperspective, the position of the optical pattern on the object beingdifferent for each image in the set; and a set of second images obtainedfrom the second perspective, the position of the optical pattern on theobject being different for each image in the set, in order to determinethe height variation data. Accordingly, the image analyser can beconfigured to calculate a phase map from at least one of the set offirst images and the set of second images.

A wrapped phase map can be used to obtain topographical data. Forinstance, a wrapped phase map can be unwrapped, and the topographicaldata can be obtained from the unwrapped phase map. Accordingly, theimage analyser can be configured to unwrap the wrapped phase map and toobtain the topographical data from the unwrapped phase map. Thetopographical data could be in the form of height data. As will beunderstood, height data can detail the position of a plurality of pointson the surface.

Obtaining topographical data can comprise determining the gradient ofthe surface. Obtaining topographical data can comprise determining thegradient of the surface relative to the imaging device.

Determining the gradient of the surface relative to the imaging devicecan comprise calculating a phase shift map from the plurality of images.Suitable algorithms for generating a phase shift map from the pluralityof images include a Carré algorithm such as that described in Cure, P.“Installation et utilisation du comparateur photoelectrique etinterferential du Bureau International des Podis et Mesure” Metrologia 213-23 (1996). Determining the gradient of the surface can furtherobtaining a gradient map based on the phase shift map. The gradient mapcan be obtained by converting the value of each of the points on a phaseshift map to a gradient value. The value of a point in a phase shift mapcan be converted to a gradient value using a predetermined mappingprocedure. As will be understood, a phase shift map can detail the phaseshift for a plurality of points on the surface due to the change inposition of projected fringes on the object's surface. The phase shiftcan be bound in a range of 360 degrees. A gradient map can detail thesurface gradient relative to the image sensor of a plurality of pointson the surface.

The method can further comprise integrating the gradient map to obtainheight data. As explained above, height data can detail the position ofa plurality of points on the surface relative to the image sensor.

The image analyser can be configured to calculate at least one of afirst phase map from the set of first images and a second phase map fromthe set of second images. Phase maps calculated from a set of imagestaken from the substantially the same perspective, the position of theoptical pattern on the object in each image being different, can providea more accurate and reliable phase map.

The image analyser can be configured to determine the topographical datafrom at least one of the at least one of a first phase map and secondphase map. As mentioned above, the phase maps can be wrapped phase maps.In this case, the at least one of a first wrapped phase map and secondwrapped phase map can be unwrapped, and the topographical data can beobtained from the unwrapped phase map.

The position of the optical pattern could be changed between obtainingeach of the images in a set of images by changing the optical patternemitted by the projector. For instance, a projector can comprise a laserbeam which is incident on a lens which diverges the beam on to a liquidcrystal system to generate at least one fringe pattern on the surface tobe measured. A computer can be used to control the pitch and phase ofthe fringe pattern generated by the liquid crystal system. The computerand the liquid crystal system can perform a phase-shifting technique inorder to change the phase of the optical pattern.

Optionally, the position of the optical pattern could be changed byrelatively moving the object and the projector. The object and projectorcould be rotated relative to each other in order to displace the opticalpattern on the surface. Optionally, the object and projector arelaterally displaced relative to each other. As will be understood, theobject could be moved between the obtaining each of the plurality ofimages. Optionally, the projector could be moved between the obtainingeach of the plurality of images.

This can be particularly preferred when the projector has a fixedoptical pattern. Accordingly, the projector can be configured such thatit can project one optical pattern only. For example, the projectorcould be one in which the pitch or phase of the optical pattern cannotbe altered.

The object and projector can be moved relative to each other by anyamount which provides a change in the position of the projected opticalpattern relative to the object. When the optical pattern has a period,preferably the object and projector are moved relative to each othersuch that the position of the pattern on the object is at leastnominally moved by a non-integral multiple of the period of the pattern.For instance, when the optical pattern is a fringe pattern, the objectand projector can be relative to each other such that the position ofthe pattern on the object is at least nominally moved by a non-integralmultiple of the fringe period. For example, the object and projector canbe moved relative to each other such that the position of the pattern onthe object is at least nominally moved by a ¼ of the fringe period. Aswill be understood, the actual distance the projector and object are tobe moved relative to each other to obtain such a shift in the pattern onthe object can depend on a number of factors including the period of theperiodic optical pattern projected and the distance between the objectand the projector.

As will be understood, relatively moving the projector and object willcause a change in the position of the optical pattern on the object.However, it may appear from images of the optical pattern on the objecttaken before and after the relative movement that the optical patternhas not moved. This can be referred to as nominal movement. Whether ornot the movement is nominal or actual will depend on a number of factorsincluding the form of the optical pattern projected, and the shapeand/or orientation of the surface of the object relative to theprojector. For instance, the change in position of the optical patternon a surface for a given movement will be different for differentlyshaped and oriented surfaces. It might be that due to the shape and/ororientation of the surface that it would appear that the optical patternhas not changed position, when it fact it has moved and that thatmovement would have been apparent on a differently shaped or positionedobject. What is important is that it is known that the relative movementis such that it would cause a change in the position of the opticalpattern on a reference surface of a known shape and orientation relativeto the projector. Accordingly, it is effectively possible to determinethe shape and orientation of the surface by determining how the positionof the optical pattern as imaged differs from the known reference.

The projector could be moved such that the position of the opticalpattern relative to a predetermined reference plane in the measurementspace is changed. The projector could be moved such that the position ofthe optical pattern relative to a predetermined reference plane in themeasurement space is changed by a non-integral multiple of the period ofthe pattern. The predetermined reference plane could be the referenceplane of the image sensor. Again, the shape and/or orientation of thesurface of the object can then be determined by effectively comparingthe position of the optical pattern on the surface relative to what itwould be like at the reference plane.

If the probe comprises the projector, then the object and imaging devicewill be moved relative to each other as a consequence of obtaining ashift in the position of the optical pattern on the object. In thiscase, then preferably the amount of relative movement should besufficiently small such that the perspective of the object obtained bythe image sensor in each of the images is substantially the same. Inparticular, preferably the movement is sufficiently small that anychange in the perspective between the plurality of images can becompensated for in the step of analysing the plurality images.

In a preferred embodiment in which the probe comprises a projector andan imaging device, the probe can be moved between images by rotating theprobe about the imaging device's perspective centre. It has been foundthat rotating about the imaging device's perspective centre makesprocessing the images to compensate for any relative movement betweenthe object and imaging device (discussed in more detail below). Inparticular it makes matching corresponding pixels across a number ofimages easier. For instance, matching corresponding pixels is possibleusing a coordinate transformation which is independent of the distancebetween the object and the imaging device. Accordingly, it is notnecessary to know the distance between the object and imaging device inorder to process the images to compensate for any relative movementbetween the object and imaging device.

Accordingly, the image analyser can be configured to: i) identify commonimage areas covered by each of the images in a set of images. The imageanalyser can be configured to then ii) calculate the phase map for theset using the common image areas only. Identifying common image areascovered by each of the images in a set of images can comprise adjustingthe image coordinates to compensate for relative movement between theobject and the imaging device.

Details of a method and apparatus in which the position of an opticalpattern on the object is changed between obtaining each of a pluralityof images of the object, and in which topographical data is obtained byanalysing those images are disclosed in the co-pending PCT applicationfiled on the same day as the present application with the title PHASEANALYSIS MEASUREMENT APPARATUS AND METHOD and having the applicant'sreference number 742/WO/0 and claiming priority from UK PatentApplication nos. 0716080.7, 0716088.0, 0716109.4.

Accordingly, in particular, this application describes a non-contactmeasurement apparatus, comprising: a probe for mounting on a coordinatepositioning apparatus, the probe comprising a projector for projectingan optical pattern onto the surface of an object to be measured, and animage sensor for imaging the optical pattern on the surface of theobject; an image analyser configured to analyse at least one first imageof an object on which an optical pattern is projected, the first imagebeing obtained from a first known perspective, and at least one secondimage of the object on which the optical pattern is projected, thesecond image being obtained from a second known perspective, so as to:a) identify at least one target feature on the object to be measured andto determine the position of the target feature on the object relativeto the image sensor; and b) determine topographical data regarding thesurface on which the optical pattern is projected from at least one ofthe first and second images.

This application also describes in particular a non-contact method formeasuring an object located within a measurement space comprising, inany suitable order, the steps of: i) an image sensor obtaining at leasta first image of an object on which an optical pattern is projected, theat least first image being obtained from a first perspective; ii) theimage sensor obtaining at least a second image of the object on whichthe optical pattern is projected, the second image being obtained from asecond perspective; and iii) analysing the first and at least secondimages so as to: a) identify at least one target feature on the objectto be measured and to determine the position of the target feature onthe object relative to the image sensor; and b) obtain shape data of thesurface on which the optical pattern is projected from at least one ofthe first and second imaged optical patterns.

According to a second aspect of the invention there is provided an imageanalyser for use in a non-contact measurement apparatus as describedabove.

According to a third aspect of the invention there is provided anon-contact method for measuring an object located within a measurementspace using a probe comprising at least one imaging device, the methodcomprising: the probe obtaining a plurality of images of the object,comprising at least one first image of the object from a firstperspective, at least one second image of the object from a secondperspective, and at least one image of the object on which a opticalpattern is projected; analysing the plurality of images to identify atleast one target feature on the object to be measured and to obtaintopographical data regarding a surface of the object via analysis of theoptical pattern.

At least one of the at least one image of the object from a firstperspective and at least one image of the object from a secondperspective comprises the at least one image of the object on which anoptical pattern is projected. Accordingly, the method can compriseobtaining topographical data from at least one of the at least one firstimage of the object from a first perspective and at least one secondimage of the object from a second perspective.

The method can comprise relatively moving the object and probe betweenthe first and second perspectives. This can be particularly preferredwhen the probe comprises a single imaging device only.

The optical pattern can be projected by a projector that is separate tothe probe. Optionally, the probe can comprise at least one projector forprojecting an optical pattern.

According to a fourth aspect of the invention there is provided anon-contact measurement apparatus, comprising: a coordinate positioningapparatus having a repositionable head; and a non-contact measurementprobe mounted on the head comprising: a projector for projecting anoptical pattern onto the surface of an object to be measured; and animage sensor for imaging the optical pattern on the surface of theobject.

It is an advantage of the invention that the probe is mounted on acoordinate positioning apparatus. Doing so facilitates the acquisitionof images of an object from multiple perspectives through the use ofonly a single probe device. Further as the probe is mounted on acoordinate positioning apparatus, it can be possible to accuratelydetermine the position and orientation of the probe from the coordinatepositioning machine's position reporting features. For example, thecoordinate position machine could comprise a plurality of encoders fordetermining the position of relatively moveable parts of the coordinatepositioning machine. In this case, the position and orientation of theimage sensor could be determined from the output of the encoders. Aswill be understood, coordinate positioning apparatus include coordinatemeasuring machines and other positioning apparatus such as articulatingarms and machine tools, the position of what a tool or other devicemounted on them can be determined.

Preferably the head is an articulating probe head. Accordingly,preferably the probe head can be rotated about at least one axis.Preferably the coordinate positioning apparatus is a computer controlledpositioning apparatus. The coordinate positioning apparatus couldcomprise a coordinate measuring machine (CMM). The coordinatepositioning apparatus could comprise a machine tool.

The non-contact measurement apparatus could further comprise an imageanalyser configured to determine topographical data regarding thesurface on which an optical pattern is projected by the projector fromat least one of image obtained by the image sensor. The image analysercould be configured as described above.

This application also describes a non-contact measurement probe formounting on a coordinate positioning apparatus, comprising: a projectorfor projecting an optical pattern onto the surface of an object to bemeasured; and an image sensor for imaging the optical pattern on thesurface of the object.

This application further describes a non-contact measurement methodcomprising: a projector mounted on a head of a coordinate positioningmachine projecting an optical pattern onto a surface of an object to bemeasured; an image sensor imaging the optical pattern on the surface;and an image analyser determining topographical data regarding thesurface of the object based on the image and on position informationfrom the coordinate positioning machine.

The optical pattern can extend in two dimensions. The optical patternprojected can enable the determination of the topology of the surface ofan object in two dimensions from a single image of the optical patternon the object. The optical pattern can be a substantially full-fieldoptical pattern. A substantially full-field optical pattern can be onein which the pattern extends over at least 50% of the field of view ofthe image sensor at a reference plane (described in more detail below),more preferably over at least 75%, especially preferably over at least95%, for example substantially over the entire field of view of theimage sensor at a reference plane. The reference plane can be a planethat is a known distance away from the image sensor. Optionally, thereference plane can be a plane which contains the point at which theprojector's and image sensor's optical axes intersect. The referenceplane can extend perpendicular to the image sensor's optical axis.

The optical pattern could be a set of concentric circles, or a set ofparallel lines of alternating colour, shades, or tones. Preferably, theperiodic optical pattern is a fringe pattern. For example, the periodicoptical pattern can be a set of sinusoidal fringes. The periodic opticalpattern can be in the infrared to ultraviolet range. Preferably, theperiodic optical pattern is a visible periodic optical pattern.

According to a further aspect of the invention there is providedcomputer program code comprising instructions which, when executed by acontroller, causes the machine controller to control a probe comprisingat least one imaging device and image analyser in accordance with theabove described methods.

According to a yet further aspect of the invention there is provided acomputer readable medium, bearing computer program code as describedabove.

As will be understood, features described in connection with the firstaspect of the invention are also applicable to the other aspects of theinvention where appropriate.

Accordingly, this application describes, a non-contact measurementapparatus, comprising: a probe for mounting on a coordinate positioningapparatus, the probe comprising a projector for projecting a structuredlight pattern onto the surface of an object to be measured, and an imagesensor for imaging the structured light pattern on the surface of theobject; an image analyser configured to analyse at least one first imageof an object on which a structured light pattern is projected, the firstimage being obtained from a first known perspective, and at least onesecond image of the object on which the structured light pattern isprojected, the second image being obtained from a second knownperspective, so as to: a) identify at least one target feature on theobject to be measured and to determine the position of the targetfeature on the object relative to the image sensor; and b) determinetopographical data regarding the surface on which the structured lightpattern is projected from at least one of the first and second images.

An embodiment of the invention will now be described, by way of exampleonly, with reference to the following Figures, in which:

FIG. 1 shows a schematic perspective view of a coordinate measuringmachine on which a probe for measuring an object via a non-contactmethod according to the present invention is mounted;

FIG. 2 illustrates various images of the object shown in FIG. 1 obtainedby the probe from three different perspectives;

FIG. 3 illustrates a plurality of wrapped phase maps for each of thethree different perspectives;

FIG. 4 shows a flow chart illustrating the high-level operation of theapparatus shown in FIG. 1;

FIG. 5 illustrates the method of capturing a perspective image set;

FIG. 6 illustrates the method of obtaining fringe shifted images;

FIG. 7 illustrates the method of analysing the images;

FIG. 8 illustrates the method of calculating the wrapped phase maps;

FIG. 9 illustrates a first method for obtaining a height map;

FIG. 10 illustrates the a second method for obtaining a height map;

FIG. 11 is a schematic diagram of the components of the probe shown inFIG. 1;

FIG. 12 is a schematic diagram of the positional relationship of theimaging device and projector of the probe shown in FIG. 11;

FIG. 13 is a schematic diagram of the projector shown in FIG. 11; and

FIG. 14 illustrates a set of fringe shifted images, the position of thefringe on the object being different in each image;

FIG. 15 illustrates the effect of moving the image sensor relative tothe object;

FIG. 16 illustrates how the gradient of the object surface can bedetermined from the phase shift;

FIG. 17 illustrates obtaining fringe shifted images by causing rotationabout the image sensor's perspective centre; and

FIG. 18 illustrates the stand-off distance and depth of field of animaging device.

Referring to FIG. 1, a coordinate measuring machine (CMM) 2 on which ameasurement probe 4 according to the present invention is mounted, isshown.

The CMM 2 comprises a base 10, supporting a frame 12 which in turn holdsa quill 14. Motors (not shown) are provided to move the quill 14 alongthe three mutually orthogonal axes X, Y and Z. The quill 14 holds anarticulating head 16. The head 16 has a base portion 20 attached to thequill 14, an intermediate portion 22 and a probe retaining portion 24.The base portion 20 comprises a first motor (not shown) for rotating theintermediate portion 22 about a first rotational axis 18. Theintermediate portion 22 comprises a second motor (not shown) forrotating the probe retaining portion 24 about a second rotational axisthat is substantially perpendicular to the first rotational axis.Although not shown, bearings may also be provided between the moveableparts of the articulating head 16. Further, although not shown,measurement encoders may be provided for measuring the relativepositions of the base 10, frame 12, quill 14, and articulating head 16so that the position of the measurement probe 4 relative to a workpiecelocated on the base 10 can be determined.

The probe 4 is removably mounted (e.g. using a kinematic mount) on theprobe retaining portion 24. The probe 4 can be held by the proberetaining portion 24 by the use of corresponding magnets (not shown)provided on or in the probe 4 and probe retaining portion 24.

The head 16 allows the probe 4 to be moved with two degrees of freedomrelative to the quill 14. The combination of the two degrees of freedomprovided by the head 16 and the three linear (X, Y, Z) axes oftranslation of the CMM 2 allows the probe 4 to be moved about five axes.

A controller 26 comprising a CMM controller 27 for controlling theoperation of the CMM 2 is also provided, and a probe controller 29 forcontrolling the operation of the probe 4 and an image analyser 31 foranalysing the images obtained form the probe 4. The controller 26 may bea dedicated electronic control system and/or may comprise a personalcomputer.

The CMM controller 27 is arranged to provide appropriate drive currentsto the first and second motors so that, during use, each motor impartsthe required torque. The torque imparted by each motor may be used tocause movement about the associated rotational axis or to maintain acertain rotational position. It can thus be seen that a drive currentneeds to be applied continuously to each motor of the head 16 duringuse; i.e. each motor needs to be powered even if there is no movementrequired about the associated rotational axis.

It should be noted that FIG. 1 provides only a top level description ofa CMM 2. A more complete description of such apparatus can be foundelsewhere; for example, see EP402440 the entire contents of which areincorporated herein by this reference.

Referring now to FIG. 11, the probe 4 comprises a projector 40 forprojecting, under the control of a processing unit 42 a fringe patternonto the object 28, an imaging device 44 for obtaining, under thecontrol of the processing unit 42 an image of the object 28 onto whichthe fringe pattern is projected. As will be understood, the imagingdevice 44 comprises suitable optics and sensors for capturing images ofthe object 28. In the embodiment described, the imaging device comprisesan image sensor, in particular a CCD defining an image plane 62. Theimaging device 44 also comprises a lens (not shown) to focus light atthe image plane 62.

The processing unit 42 is connected to the probe controller 29 and imageanalyser 31 in the controller unit 26 such that the processing unit 42can communicate with them via a communication line 46. As will beunderstood, the communication line 46 could be a wired or wirelesscommunication line. The probe 4 also comprises a random access memory(RAM) device 48 for temporarily storing data, such as image data, usedby the processing unit 42.

As will be understood, the probe 4 need not necessarily contain theprocessing unit 42 and/or RAM 48. For instance, all processing and datastorage can be done by a device connected to the probe 4, for instancethe controller 26 or an intermediate device connected between the probe4 and controller 26.

As illustrated in FIG. 12, the projector's 40 image plane 60 and theimaging device's 44 image plane 62 are angled relative to each othersuch that the projector's 40 and imaging device's optical axes 61, 63intersect at a reference plane 64. In use, the probe 4 is positionedsuch that the fringes projected onto the object's surface can be clearlyimaged by the imaging device 44.

With reference to FIG. 13, the projector 40 comprises a laser diode 50for producing a coherent source of light, a collimator 52 forcollimating light emitted from the laser diode 50, a grating 54 forproducing a sinusoidal set of fringes, and a lens assembly 56 forfocussing the fringes at the reference plane 64. As will be understood,other types of projectors would be suitable for use with the presentinvention. For instance, the projector could. comprise a light sourceand a mask to selectively block and transmit light emitted from theprojector in a pattern.

In the described embodiment, the periodic optical pattern projected bythe projector 40 is a set of sinusoidal fringes. However, as will beunderstood, other forms of structured light could be projected, such asfor example a set of parallel lines having different colours or tones(e.g. alternating black and white lines, or parallel red, blue and greenlines), or even for example a set of concentric circles.

Referring to FIGS. 2 to 10, the operation of the probe 4 will now bedescribed.

Referring first to FIG. 4, the operation begins at step 100 when theoperator turns the CMM 2 on. At step 102, the system is initialised.This includes loading the probe 4 onto the articulating head 16,positioning the object 28 to be measured on the base 10, sending theCMM's encoders to a home or reference position such that the position ofthe articulating head 16 relative to the CMM 2 is known, and alsocalibrating the CMM 2 end probe 4 such that the position of a referencepoint of the probe 4 relative to the CMM 2 is known.

Once initialised and appropriately calibrated, control passes to step104 at which point a set of images of the object 28 is obtained by theprobe 4. This step is performed a plurality of times so that a pluralityof image sets are obtained, wherein each set corresponds to a differentperspective or view point of the object 28. In the example described,three sets of images are obtained corresponding to three differentperspectives. The process of obtaining a set of images is explained inmore detail below with respect to FIG. 5.

Once all of the images have been obtained, the images are analysed atstep 106 by the image analyser 31 in the controller 26. The imageanalyser 31 calculates from the images a set of three dimensional (“3D”)coordinates relative to the CMM 2 which describe the shape of the object28. The method of analysing the images will be described in more detailbelow with reference to FIG. 7. The 3D coordinates are then output atstep 108 as a 3D point cloud. As will be understood, the 3D point cloudcould be stored on a memory device for later use. The 3D point clouddata could be used to determine the shape and dimensions of the objectand compare it to predetermined threshold data to assess whether theobject 28 has been made within predetermined tolerances. Optionally, the3D point cloud could be displayed on a graphical user interface whichprovides a user with virtual 3D model of the object 28.

The operation ends at step 110 when the system is turned off.Alternatively, a subsequent operation could be begun by repeating steps104 to 108. For instance, the user might want to obtain multiple sets ofmeasurement data for the same object 28, or to obtain measurement datafor a different object.

Referring now to FIG. 5, the process 104 of capturing an image set for aperspective will now be described. The process begins at step 200 atwhich point the probe 4 is moved to a first perspective. In thedescribed embodiment, the user can move the probe 4 under the control ofa joystick (not shown) which controls the motors of the CMM 2 so as tomove the quill 14. As will be understood, the first (and subsequent)perspective could be predetermined and loaded into the CMM controller 27such that during the measurement operation the probe 4 is automaticallymoved to the predetermined perspectives. Further, on a differentpositioning apparatus, the user could physically drag the probe 4 to theperspectives, wherein the positioning apparatus monitors the position ofthe probe 4 via, for example, encoders mounted on the moving parts ofthe apparatus.

Once the probe 4 is positioned at the first perspective, an initialisingimage is obtained at step 202. This involves the probe controller 29sending a signal to the processing unit 42 of the probe 4 such that itoperates the imaging device 44 to capture an image of the object 28.

The initialising image is sent back to the image analyser 31 and at step204, the image is analysed for image quality properties. This caninclude, for example, determining the average intensity of light andcontrast of the image and comparing them to predetermined thresholdlevels to determine whether the image quality is sufficient to performthe measurement processes. For example, if the image is too dark thenthe imaging device 44 or projector 40 properties could be changed so asto increase the brightness of the projected fringe pattern and/or adjustthe expose time or gain of the imaging device 44. The initialising imagewill not be used in subsequent processes for obtaining measurement dataabout the object 28 and so certain aspects of the image, such as theresolution of the image, need not be as high as that for the measurementimages as discussed below. Furthermore, in alternative embodiments, alight sensor, such as a photodiode, separate to the imaging device couldbe provided in the probe to measure the amount of light at a perspectiveposition, the output of the photodiode being used to set up theprojector 40 and/or imaging device 44.

Once the projector 40 and imaging device 44 have been set up, the firstmeasurement image is obtained at step 206. What is meant by ameasurement image is one which is used in the “analyse images” process106 described in more detail below. Obtaining the first measurementimage involves the probe controller 29 sending a signal to theprocessing unit 42 of the probe 4 such that the processing unit 42 thenoperates the projector 40 to project a fringe pattern onto the object 28and for the imaging device 44 to simultaneously capture an image of theobject 28 with the fringe pattern on it.

The first measurement image is sent back to the image analyser 31 and atstep 208, the first measurement image is again analysed for imagequality properties. If the image quality is sufficient for use in the“analyse images” process 106 described below, then control is passed tostep 210, otherwise control is passed back to step 204.

At step 210, fringe shifted images are obtained for the currentperspective. Fringe shifted images are a plurality of images of theobject from substantially the same perspective but with the position ofthe fringes being slightly different in each image. The method this stepis described in more detail below with respect to FIG. 6.

Once the fringe shifted images have been obtained, all of the images arethen sent back to the imager analyser 31 for analysis at step 212. Aswill be understood, data concerning the position and orientation thatthe probe 4 was at when each image was obtained will be provided to theimage analyser 31 along with each image, such that 3D coordinates of theobject 28 relative to the CMM 2 can be obtained as explained in moredetail below. The process then ends at step 214.

As explained above, the capture perspective image set process 104 isrepeated a plurality of times for a plurality of different perspectives.In this described example, the capture perspective image set process isperformed three times, for first, second and third perspectives. Theprobe 4 is moved to each perspective either under the control of theuser or controller as explained above.

With reference to FIG. 6, the process 210 for obtaining the fringeshifted images will now be described. The fringes projected on theobject 28 are shifted by physically moving the probe 4 by a smalldistance in a direction such that the position of the fringes on theobject 28 are different from the previous position. As the probe 4 isshifted, the projector 40 within it, and hence the projector's opticalaxis 61, will also be shifted relative to the object 28. This is whatprovides the change in position of the fringes of the object 28.

In one embodiment, the probe 4 is moved in a direction that is parallelto the imaging device's 44 image plane and perpendicular to the lengthof the fringes.

However, this need not necessarily be the case, so long as the positionof the fringes on the object is moved. For example, the hinge shiftingcould be achieved by rotating the probe 4. For instance, the probe 4could be rotated about an axis extending perpendicular to theprojector's image plane 60. Optionally the probe could be rotated aboutan axis extending perpendicular to the imaging device's 44 image plane.In another preferred embodiment the probe 4 can be rotated about theimaging device's 44 perspective centre. This is advantageous becausethis ensures that the perspective of the features captured by theimaging device 44 across the different images will be the same. It alsoenables any processing of the images to compensate for relative movementof the object and image sensor to be done without knowledge of thedistance between the object and image sensor.

For example, with reference to FIG. 17 the probe 4 is located at a firstposition (referred to by reference numeral 4′) relative to an object 70to be inspected. At this instance the probe's projector 40 is at a firstposition (referred to by reference numeral 40′) which projects a fringepattern illustrated by the dotted fringe markings 72′ on the object 70.An image 74 of the object with the fringe markings 72′ is captured bythe imaging device 44 which is at a first position referred to byreference numeral 44′.

The probe 4 is then moved to a second position, referred to by referencenumeral 4″, by rotating the probe 4 relative to the object 70 about theimaging device's perspective centre. As will be understood, an imagingdevice's perspective centre is the point through which all light raysthat intersect with the image plane are assumed to pass. In the figureshown, the perspective centre is referred to by reference numeral 76.

As can be seen, at the second position the projector, referred to byreference numeral 40″, has moved such that the position of the fringepattern on the object 70 has moved. The new position of the fringepattern on the object 70 is illustrated by the striped fringe markings72″ on the object 70. An image 74 of the object is captured by theimaging device at its second position 44″. As can be seen, although theposition of the image of the object on the imaging device 44 has changedbetween the first 44′ and second 44″ positions of the imaging device,the perspective the imaging device 44 has of the object 70 does notchange between the positions. Accordingly, for example, features thatare hidden due to occlusion in one image will also be hidden due toocclusion in the second. This is illustrated by the rays 78 illustratingthe view the imaging device 44 has of the tall feature 80 on the object.As can be seen, because the imaging device 44 is rotated about itsperspective centre, the rays 78 are identical for both positions and soonly the location of the feature on the imaging device 44 changesbetween the positions, not the form of the feature itself.

Accordingly, rotating about the perspective centre can be advantageousas the image sensor's perspective of the object does not change therebyensuring that the same points on the object are visible for eachposition. Furthermore, for any point viewed, the distance between theimage points of it before and after the relative rotation of camera andobject is independent of the distance to the object. That is, for anunknown object, if the camera is rotated about its own perspectivecentre it is possible to predict, for each imaged point before therotation, where it will be imaged after rotation. The position of animage point after the rotation depends on the position of the initialimage point, the angle (and axis) of rotation, and the internal cameraparameters—all known values. Accordingly, as is described in more detailbelow, rotating about the perspective centre allows the relative motionto be compensated for without knowing the distance to the object.

The probe 4 is moved a distance corresponding to a fringe shift of ¼period at the point where the imaging device's 44 optical axis 63intersects the reference plane 64. As will be understood, the actualdistance the probe 4 is moved will depend on the period of the fringesprojected and other factors such as the magnification of the projector40.

Once the probe 4 has been shifted, another measurement image is obtainedat step 302. The steps of shifting the probe 300 and obtaining ameasurement image 302 is repeated two more times. Each time, the probeis shifted so that for each measurement image the position of the fringepattern on the object is different for all previous images. Accordingly,at the end of the obtain fringe shifted images process 210 four imagesof the object have been obtained for a given perspective, with theposition of the fringe pattern on the object for each image beingslightly different.

Reference is now made to FIG. 2. Row A shows the view of the object 28at each of the three perspectives with no fringes projected onto it. RowB illustrates, for each of the first, second and third perspectives theimage 1000 that will be obtained by the imaging device 44 at step 206 ofthe process for capturing a perspective image set 104. Schematicallyshown behind each of those images 1000 are the fringe shifted images1002, 1004 and 1006 which are obtained during execution of steps 300 and302 for each of the first, second and third perspectives. FIGS. 14(a) to14(d) shows an example of the images 1000-1006 obtained for the firstperspective. As shown, the relative position of the object and imagingdevice has moved slightly between obtaining each image in an image setfor a perspective, and this needs to be taken into consideration and/orcompensated for during processing of the images as described in moredetail below (especially as described in connection with FIG. 8).

Accordingly, once the step 104 of capturing the first, second and thirdimage sets has been completed, the image analyser 31 will have a set ofimages 1000-1006 for each of the first, second and third perspectives.

The process 106 for analysing the images will now be described withreference to FIG. 7. The process begins at step 400 at which point fourwrapped phase maps are calculated for each of the first, second andthird perspectives. As will be understood, a wrapped phase map is a mapwhich contains the phase of the fringes projected onto the object'ssurface for a plurality of pixels in one of the measurement images in aperspective image set, where the phase angle is bound within a range of360 degrees.

For a given perspective, a wrapped phase map is obtained using each ofthe four phase shifted images for that perspective in a particularorder. The four wrapped phase maps for a given perspective are obtainedby using each of the four phase shifted images in different orders. Themethod for obtaining a wrapped phase map will be explained in moredetail below with reference to FIG. 8.

As will be understood, it need not be necessary to calculate fourwrapped phase maps for each perspective. For instance, two or morewrapped phase maps could be calculated for each of the perspectives. Aswill be understood, the more wrapped phase maps that are calculated, themore reliable the determination of real discontinuities as explained inmore detail below, but the more processing resources required.

Referring to FIG. 3, columns X, Y and Z illustrate for each of thedifferent perspectives four different wrapped phase maps 1010, 1012,1014 and 1016. Each of those wrapped phase maps for a given perspectivehas been calculated using a unique order of the four different images1002-1006 for that perspective. Four different wrapped phase maps1010-1016 for each perspective are calculated in order to be able todistinguish between those discontinuities caused by features on theobject 28 and those discontinuities caused by the wrapping of the phase,as explained in more detail below.

As can be seen from the images in row B of FIG. 2, a feature, such as anedge or corner on the object 28 causes a discontinuity in the fringepattern. For example, edge 30 on the object 28 causes a discontinuity inthe fringe pattern along line 32 in the image of the object 28 with thefringe projected on it. Accordingly, it is possible to identify featuresof the object 28 by identifying discontinuities in the fringe pattern.

At step 402, discontinuities in the fringe pattern are identified foreach of the perspectives. This is achieved by identifyingdiscontinuities in each of the wrapped phase maps. A discontinuity in awrapped phase map is identified by comparing the phase value of eachpixel to the phase values of adjacent surrounding pixels. If thedifference in the phase value between adjacent pixels is above athreshold level, then one of those pixels identifies a discontinuitypoint. As will be understood, it is not important which one of thosepixels is selected as the discontinuity point so long as the selectioncriteria is consistent for the selection of all discontinuity points,e.g. always select the pixel to the left or to the top of thedifference, depending on whether the differences between adjacent pixelsare being calculated in the x or y direction along the image. As will beunderstood, the positions of the discontinuities, once found by theabove described method, can be refined if required using imageprocessing techniques, for example by looking at the gradient of thephase, or the gradient of the intensities in the measurement images inthe surrounding region, in order to find the location of thediscontinuity to sub-pixel accuracy, for example as described in J. R.Parker, “Algorithms for image processing and computer vision”, JohnWiley and Sons, Inc (1997).

The preferred threshold level depends on a number of factors includingthe object shape, level of noise in the image and period of the fringepattern. The threshold level could be set by a user prior to theoperation or could be calculated from an analysis of the image itself.

For example, referring to the first wrapped phase map 1010 (in FIG. 3)for the first perspective, a discontinuity will be identified betweenadjacent pixels at point 34 due to the difference in the phase valuecaused by the distortion along line 32 of the fringe due to the edge 30.This discontinuity will also be identified in the other wrapped phasemaps 1012, 1014 and 1016 at the same point 34.

Other discontinuities will also be identified in the wrapped phase maps1010-1016, such as for example all the way along line 32, whichcorresponds to the edge 30.

It is possible that the above process could result in falsediscontinuities being identified due to the phase map being wrapped. Forexample, adjacent pixels might have phase values of, for instance, closeto 0 degrees and 360 degrees respectively. If so, then it would appearas if there has been a large phase jump between those pixels and thiswould be identified as a discontinuity. However, the phase jump hasmerely been caused as a result of the wrapping around of the phase,rather than due to a discontinuity in the surface of the object beingmeasured. An example of this can be seen in the first wrapped phase map1010 for the first perspective at point 36 where the phase values jumpfrom 360 degrees to 0 degrees (illustrated by the dark pixels and lightpixels respectively). The phase value for adjacent pixels will jumpsignificant at point 36 due to the phase map being wrapped.

Accordingly, once all discontinuities have been identified for each ofthe four wrapped phase maps for a given perspective, then falselyidentified discontinuities are removed at step 404. This is achieved bycomparing the discontinuities for each of the wrapped phase maps for agiven perspective, and only keeping the discontinuities that appear inat least two of the four wrapped phase maps. As will be understood, amore stringent test could be applied by, for example, only keeping thediscontinuities that appear in three or four of the wrapped phase maps.This can help overcome problems caused by noise on the images. Thisprocess 404 is performed for each of the first to third perspectiveimage sets.

For example, as mentioned above a discontinuity would have beenidentified at point 36 in the first wrapped phase map 1010 for the firstperspective. However, when looking at the other wrapped phase maps 1012to 1016 for the first perspective, a discontinuity would not have beenidentified at that same point 36. This is because the different wrappedphase maps have been calculated using a different order of the fringeshifted images 1000 to 1006, thereby ensuring that the phase wrapping inthe wrapped phase maps occurs at different points. Accordingly, as thediscontinuity identified at point 36 in the first wrapped phase map 1010is not also identified in the other wrapped maps 1012 to 1016, then thatdiscontinuity can be discarded.

However, as the discontinuity at point 34 in the first wrapped phase map1010 has been confirmed by discontinuities identified at the same point34 in all the other wrapped phase maps 1012 to 1014, point 34 isidentified as a real discontinuity, i.e. a discontinuity caused by afeature on the object 28, rather than as a result of phase wrapping.

At step 406, corresponding discontinuity points between each of theperspectives are identified. Corresponding discontinuity points arethose points in the wrapped phase maps which identify a discontinuitycaused by the same feature on the object 28. For example, discontinuitypoint 38 on each of the first wrapped phase maps 1010 for each of thefirst, second and third perspectives all identify the same corner 39 onthe object 28. Corresponding discontinuity points can be determined byknown matching techniques and, for example, utilising epipolar geometry.Such known techniques are described, for example in A. Gruen, “Leastsquares matching: a fundamental measurement algorithm” in K. B. Atkinson(ed.), “Close range photogrammetry and machine vision”, WhittlesPublishing (2001). The correlated discontinuity points can then be usedas target points, the 3D coordinates of which relative to the probe 4can be determined at step 408 by known photogrammetry techniques, suchas those described in, for example, M. A. R Cooper with S. Robson,“Theory of close-range photogrammetry” in K. B. Atkinson (ed.), “Closerange photogrammetry and machine vision”, Whittles Publishing (2001).

Accordingly, after step 408 a number of discrete points on the object 28will have been identified and their position relative to the probe 4measured.

At step 410, a height map for a continuous section of the object 28 iscalculated. A height map provides information on the height of thesurface above a known reference plane 6 relative to the probe 4. Acontinuous section is an area of the object enclosed by discontinuousfeatures, e.g. the face of a cube which is enclosed by four edges.Continuous sections can be identified by identifying those areas in thewrapped phase map which are enclosed by discontinuity points previouslyidentified in steps 402 to 406. The height map provides measurement dataon the shape of the surface between those discrete points. Methods forobtaining the height map for a continuous section are described below inmore detail with respect to FIGS. 9 and 10. Steps 410 could be performeda plurality of times for different continuous sections for one or moreof the different perspectives.

As is usual in similar fringe analysis systems, the unwrapped phase mapis correct only to some unknown multiple of 2π radians, and thereforethe height above the reference plane 64 may be wrong by whatever heightcorresponds to this unknown phase difference. This is often called 2πambiguity. The measured 3D coordinates of the real discontinuitiesobtained in step 408 are used in order to resolve these ambiguities.

At this stage, the 3D coordinates of the real discontinuity pointsobtained in step 408 and the height map data obtained in step 410provide the position of the object relative to a predetermined referencepoint in the probe 4. Accordingly, at step 412, these coordinates areconverted to 3D coordinates relative to the CMM 2. This can be performedusing routine trigonometry techniques as the relative position of theCMM 2 and the reference point in the probe 4 is known from calibration,and also because the position and orientation of the probe 4 relative tothe CMM 2 at the point each image was obtained was recorded with eachimage.

The process for calculating a wrapped phase map 400 will now bedescribed with reference to FIG. 8. Calculating a wrapped phase mapcomprises calculating the phase for each pixel for one of a set offringe-shifted images. This can be done using various techniques, theselection of which can depend on various factors including the method bywhich the fringe-shifted images are obtained. Standard phase-shiftingalgorithms rely on that the relative position between the object andimaging device 44 is the same across all of the fringe-shifted images.However, if either of the methods described above (e.g. either movingthe probe 4 laterally or rotating it about the imaging device'sperspective centre) are used to obtain the fringe-shifted images thenthe imaging device 44 will have moved a small distance relative to theobject. Accordingly, for each successive image in a perspective imageset, a given pixel in each image will be identifying the intensity of adifferent point on the object. Accordingly, if standard phase-shiftingalgorithms are to be used it is necessary to identify across all of thefringe shifted images which pixels correspond to same point on theobject, and to then compensate for this. One way of doing this when theimaging device 44 has moved laterally is to determine by how much and inwhat direction the imaging device 44 has traveled between each image,and by then cropping the images so that each image contains image datacommon to all of them. For example, if the movement of the imagingdevice 44 between two images means that a point on an object has shiftedfive pixels in one dimension, then the first image can be cropped toremove five pixel widths worth of data.

This can be seen more clearly with reference to FIG. 15 whichschematically illustrates corresponding rows of pixels for each of thefirst 1000, second 1002, third 1004 and fourth 1006 images. As can beseen, due to relative movement of the imaging device 44 and the object28 between the images, the same point on an object is imaged bydifferent pixels in each image. For instance, point X on the object 28is imaged by the 7^(th) pixel from the left for the first image 1000,the 5^(th) pixel from the left for the second image 1002, the 3^(rd)pixel from the left for the third image 1004 and the 4^(th) pixel fromthe left for the fourth image 1006. An effective way of compensating forthe relative movement of image sensor and object 28 is to crop the imagedata such that each image 1000-1006 contains a data representing acommon region, such as that highlighted by window 51 in FIG. 15.

Cropping the images is one example of a coordinate transformation, wherethe transformation is a linear function. This can be most accurate insituations where the distance to the object is known, or, for instance,where the stand-off distance is large compared to the depth of themeasuring volume. As will be understood, and with reference to FIG. 18,the stand-off distance is the distance from the imaging device'sperspective centre 76 to the centre of the imaging device's measurementvolume and the depth of field 65 or depth of measurement volume is therange over which images recorded by the device appear sharp. In otherwords, the stand-off distance is the nominal distance from the probe 4to the object to be measured. For instance, if the ratio of stand-offdistance to depth of measuring volume is around 10:1 then there can bean error of up to 10% in the compensation for some pixels. If either thestand-off distance is not large compared to the depth of the measuringvolume, or if the relative motion is not a linear translation, then themost appropriate coordinate transformation to compensate for relativemotion of the imaging device and the object can depend, in general onthe distance to the object and the actual motion. However, it has beenfound that if the motion is rotation about the imaging device's 44perspective centre then the coordinate transformation that bestcompensates for the motion is independent of the unknown distance to theobject. This is due to the geometry of the system and the motion.Furthermore, this enables accurate compensation to be performed even ifthe stand-off distance is not large compared to the depth of themeasuring volume, for instance in situations in which the ratio ofstand-off distance to depth of measuring volume is less than 10:1, forexample less than 5:1, for instance 1:1. Accordingly, this enablesmeasurement of an object to be performed even when the probe is locatedclose to the object.

Once the pixel data has been compensated for the relative motion so thatthe same pixel in each adjusted image represents the same point on theobject, the next step 502 involves using a phase-shifting algorithm tocalculate the wrapped phase at each pixel. A suitable phase-shiftingalgorithm not requiring known phase shift, for instance the Carréalgorithm, may be used to calculate the wrapped phase, phase shift andmodulation amplitude.

The process for calculating a wrapped phase map 400 is repeated threefurther times for each perspective image set, each time using the phaseshifted images in a different order, so as to obtain four wrapped phasemaps for each perspective. Accordingly, in the process for calculatingthe wrapped phase maps 400 is performed twelve times in total.

A first process for obtaining the height map 410 will now be describedwith reference to FIG. 9. The method involves at step 600 unwrapping thecontinuous section of one of the phase maps by adding integer multiplesof 360 degrees to the wrapped phase of individual pixels as required toremove the discontinuities found due to the phase calculation algorithm.The method then involves converting the unwrapped phase map to a heightmap for that continuous section at step 602. The phase for a pixel isdependent on the relative height of the surface of the object.Accordingly, it is possible, at step 602 to create a height map for thecontinuous section from that phase by directly mapping the phase valueof each pixel to a height value using a predetermined mapping table andprocedure.

In contrast to the methods for calculating a wrapped-phase map describedabove in connection with FIG. 8, i.e. in which the image coordinates arecompensated for, it has been found that there is another way tocalculate the wrapped phase when the object and imaging device 44 aremoved relative to each other which doesn't require image coordinatecompensation. This method relies on the fact that a pixel of the imagingdevice's 44 CCD will be viewing a different point on the object for eachdifferent image. If the points viewed by a single pixel in multipleimages are at different distances to the imaging device 44, then adifferent phase will be recorded at that pixel in each image. That is,the phase of the fringe pattern at that pixel will be shifted betweeneach image. The actual phase shift will depend on the distance to theobject and on the gradient of the object, as well as the known relativemotion of the imaging device 44 and object and the fixed systemparameters. The phase shift will therefore vary across the image.

As an example, with reference to FIG. 16, consider an object point Xp,imaged at x in the camera plane. If the imaging device 44 is translatedby some vector dX with respect the plane, then the point imaged by theimaging device 44 will change, as show. For clarity, the projector 40 isomitted from the diagram, but it is to be understood that the imagingdevice 44 and projector 40 are fixed with respect to each other.

h is the distance from the imaging device's 44 perspective centre to theobject point imaged at x, and δh is the change in this distance aftertranslation δX. a is the known direction of the imaging device's opticaxis, and X_(c) is the position of the perspective centre, also known.The change in h due to the motion of the imaging device 44 only is equalto δX.a. If this quantity is zero, so that the motion is perpendicularto the imaging device axis and parallel to the image plane, then anyremaining change in h must be due to the object shape.

The change in h is actually recorded as a change in phase, δφ, where,again, this will consist of a component caused by the shape of theobject, and a component caused by any motion of the imaging deviceparallel to its axis.

To measure the phase at a given pixel, we take multiple phase shiftedimages. The intensity recorded at a pixel in image k can be expressed asI_(k)=A±B cos φ_(k)where:

-   -   A=offset (i.e. the average intensity of the fringe pattern        projected onto the object as recorded by that pixel, including        any background light);    -   B=amplitude modulation of the light intensity recorded by that        pixel; and        φ_(k)=φ_(k-1)+Δφ_(k)≈φ_(k)+∇φ_(k-1)·δX_(k),k>0        using a first order Taylor series expansion, which assumes that        the translation δX is small.

The Carré algorithm is used to calculate for each pixel in a given imagein an image set, the phase and phase shift and modulation amplitude fromthe four phase-shifted images. The Carré algorithm assumes that the fourshifts in phase are equal. This will be the case, for instance, if themotion used is a translation and the surface is planar. If this is notthe case then a good approximation can be obtained by choosing motionthat it small enough that the surface gradient does not varysignificantly over the scale of the motion.

The phase data can be converted to height data. Optionally the phaseshift data can be converted to gradient data and subsequently to heightdata using the method described below in connection with FIG. 10.

The above described method provides optimum results when the object'sreflectivity and surface gradient is substantially constant on the scaleof the relative motion. Accordingly, it can be preferred that the motionbetween the images in an image set is small. Areas of the surface at toolow or too high a gradient relative to the imaging device, or with ahigh degree of curvature, can be detected by inspecting the modulationamplitude returned by the Carré algorithm, and can subsequently bemeasured by changing the relative motion used to induce the phase shiftand if necessary by viewing the object from a different perspective.

A Carré algorithm provides both phase and phase shift data for eachpixel in an image. The above methods described above in connection withFIG. 9 use the phase data to obtain the height data. However, it hasbeen possible to obtain the height information using the phase-shiftdata. In particular, a second process for obtaining the height map 410will now be described with reference to FIG. 10. This method begins atstep 700 by, for a continuous section (which is identifiable from thediscontinuities previously identified as explained above), calculating aphase shift map using a Carré algorithm on all of the images in aperspective image set. The phase shift for a pixel is dependent on thegradient of the surface of the object and how far away the object isfrom the probe 4. Accordingly, it is possible, at step 702 to create agradient map for the continuous section from that phase shift bydirectly mapping the phase shift value of each pixel to a gradient valueusing a predetermined mapping table and procedure. At step 704, thegradient map is then integrated in order to get a height map for thecontinuous surface relative to the probe 4. The measured 3D coordinatesof the real discontinuities obtained in step 408 are used in order toresolve the constant of integration to find the height above thereference plane 64.

It is an advantage of the invention that the projector may consistsimply of a grating, light source, and focussing optics. There is noneed for any moving parts within the projector or for a programmableprojector—only one pattern is required to be projected. Furthermore, noinformation about the distance to the object is required, except that it(or a section of it) is within the measuring volume—there is norequirement to have a large stand-off distance compared to themeasurement volume. Furthermore, the motion between the object and probeunit need not necessarily be in any particular direction, and may beproduced by a rotation rather than a translation or a combination of thetwo.

In the described embodiments the probe is mounted on a mountingstructure equivalent to the quill of a CMM. This invention is alsosuitable for use with planning the course of motion of a measurementdevice mounted on other machine types. For example, the probe 4 could bemounted on a machine tool. Further, the probe 4 may be mounted onto thedistal end of an inspection robot, which may for example comprise arobotic arm having several articulating joints.

As will be understood, the above provides a detailed description of justone particular embodiment of the invention and many features are merelyoptional or preferable rather than essential to the invention.

For instance, in the described embodiments the probe is mounted on amounting structure equivalent to the quill of a CMM. This invention isalso suitable for use with planning the course of motion of ameasurement device mounted on other machine types. For example, theprobe 4 could be mounted on a machine tool. Further, the probe 4 may bemounted onto the distal end of an inspection robot, which may forexample comprise a robotic arm having several articulating joints.Furthermore, the probe 4 might be in a fixed position and the objectcould be moveable, for example via a positioning machine.

As will be understood, the description of the specific embodiment alsoinvolves obtaining and processing images to obtain topographical datavia phase analysis of a periodic optical pattern. As will be understood,this need not necessarily be the case. For example, techniques such astriangulation might be used instead of using phase-stepping algorithms.Further still, if phase-stepping methods are to be used, the shift inthe pattern could be obtained using techniques other than that describedabove. For instance, they could be obtained by changing the patternprojected by the projector, or by moving the object.

The description of the specific embodiment also involves obtaining andprocessing images to obtain photogrammetrical target points byidentifying discontinuities in the pattern projected onto the object. Aswill be understood, this need not necessarily be the case. For example,target points can be identified using other known methods. For instance,target points can be identified by markers placed on the object or byprojecting a marker onto the object.

Furthermore, the description describes using the same images foridentifying target features as well as for obtaining topographical data.However, this need not necessarily be the case as, for instance,separate images could be obtained for use in the different processes. Inthis case, if target features are identified using markers stuck on orprojected onto the object then it would not be necessary to project apattern during the obtaining of images for use in identifying targetfeatures.

Further still, although the invention is described as a single probecontaining a projector and imaging device, the projector and imagesensor could be provided separately (e.g. so that they can be physicallymanipulated independently of each other). Furthermore, the probe couldcomprise a plurality of imaging devices.

The invention claimed is:
 1. A non-contact measurement apparatus,comprising: a probe configured to be mounted on a coordinate positioningapparatus, comprising an imaging device for capturing an image of anobject to be measured; a processor configured to: a) analyse at leastone first image of an object obtained by the imaging device from a firstperspective and at least one second image of the object obtained by theimaging device, which is the same imaging device used to obtain the atleast one first image of the object, from a second perspective so as toidentify in each of the at least one first image and the at least onesecond image of the object at least one common photogrammetric targetfeature on the object to be measured, determine the two-dimensionalcoordinates of the at least one common photogrammetric target feature onthe object within each image, and then, based on knowledge of therelative location and orientation of the imaging device that took theimages, determine the three dimensional coordinates of the at least onecommon photogrammetric target feature; and b) obtain topographical dataregarding a form of a surface of the object via analysis of thedistortion of a structured light pattern projected on the object causedby height variation on the surface of the object as imaged in at leastone image, obtained by the imaging device, which is the same imagingdevice used to obtain the at least one first image and the at least onesecond image of the object, wherein the non-contact measurementapparatus being further configured to use both the data obtained from a)and b) to provide a 3D point cloud that describes the shape of theobject.
 2. A non-contact measurement apparatus as claimed in claim 1, inwhich the probe comprises at least one projector for projecting anoptical pattern onto the surface of the object to be measured.
 3. Anon-contact measurement apparatus as claimed in claim 1, in which theprocessor is configured to obtain the topographical data regarding thesurface of the object via analysis of at least one of the at least onefirst image and the at least one second image.
 4. A non-contactmeasurement apparatus as claimed in claim 1, in which the processor isconfigured to process a set of images in which the position of anoptical pattern on the object is different for each image in the set inorder to determine the topographical data.
 5. A non-contact measurementapparatus as claimed in claim 1, in which the processor is configured toidentify an irregularity in an optical pattern projected on the objectin each of the first and second images as the at least one commonphotogrammetric target feature.
 6. A non-contact measurement apparatusas claimed in claim 5, in which the processor is configured to process:a set of first images obtained by the imaging device from the firstperspective, the position of an optical pattern projected onto theobject being different for each image in the set; and a set of secondimages obtained by the imaging device from the second perspective, theposition of an optical pattern projected onto the object being differentfor each image in the set, in order to identify the at least one commonphotogrammetric target feature on the object to be measured and todetermine the position of the common photogrammetric target feature onthe object relative to the an image sensor of the imaging device.
 7. Anon-contact measurement apparatus as claimed in claim 6, in which theprocessor is configured to process at least one of the first or secondsets of images in order to determine the topographical data.
 8. Anon-contact measurement apparatus as claimed in claim 7, in which theprocessor is configured to calculate at least one of a first phase mapfrom the set of first images and a second phase map from the set ofsecond images.
 9. A non-contact measurement apparatus as claimed inclaim 8, in which the processor is configured to determine thetopographical data from at least one of the at least one first phase mapand second phase map.
 10. A non-contact measurement apparatus as claimedin claim 2, in which the projector has a fixed optical pattern.
 11. Adevice for use in a non-contact measurement apparatus that includes aprobe that is configured to be mounted on a coordinate positioningapparatus, having an imaging device for capturing an image of an objectto be measured, the device comprising: a processor configured to: a)analyse at least one first image of an object obtained by the imagingdevice from a first perspective and at least one second image of theobject obtained by the imaging device, which is the same imaging deviceused to obtain the at least one first image of the object, from a secondperspective so as to identify in each of the at least one first imageand the at least one second image of the object at least one commonphotogrammetric target feature on the object to be measured, determinethe two-dimensional coordinates of the at least one commonphotogrammetric target feature on the object within each image, andthen, based on knowledge of the relative location and orientation of theimaging device that took the images, determine the three dimensionalcoordinates of the at least one common photogrammetric target feature;and b) obtain topographical data regarding a form of a surface of theobject via analysis of the distortion of a structured light patternprojected on the object caused by height variation on the surface of theobject as imaged in at least one image, obtained by the imaging device,which is the same imaging device used to obtain the at least one firstimage and the at least one second image of the object, wherein thedevice being further configured to use both the data obtained from a)and b) to provide a 3D point cloud that describes the shape of theobject.
 12. A non-contact method for measuring an object located withina measurement space using a probe comprising an imaging device, themethod comprising: a) analysing at least one first image of an objectobtained by the imaging device from a first perspective and at least onesecond image of the object obtained by the imaging device, which is thesame imaging device used to obtain the at least one first image of theobject, from a second perspective so as to identify in each of the atleast one first image and the at least one second image of the object atleast one common photogrammetric target feature on the object to bemeasured, determining the two-dimensional coordinates of the at leastone common photogrammetric target feature on the object within eachimage, and then, based on knowledge of the relative location andorientation of the imaging device that took the images, determining thethree dimensional coordinates of the at least one common photogrammetrictarget feature; and b) obtaining topographical data regarding a form ofa surface of the object via analysis of the distortion of a structuredlight pattern projected on the object caused by height variation on thesurface of the object as imaged in at least one image, obtained by theimaging device, which is the same imaging device used to obtain the atleast one first image and the at least one second image of the object,wherein both the data obtained from a) and b) is used to provide a 3Dpoint cloud that describes the shape of the object.
 13. A method asclaimed in claim 12, in which at least one of the at least one firstimage of the object from the first perspective and at least one secondimage of the object from the second perspective comprises the at leastone image of the object on which an optical pattern is projected.
 14. Amethod as claimed in claim 12 in which the method comprises relativelymoving the object and the imaging device between the first and secondperspectives.
 15. A method as claimed in claim 12 in which the probecomprises a projector for projecting an optical pattern.
 16. A memoryand a processor, the memory storing instructions which, when executed bythe processor, cause the processor to control the probe comprising theimaging device in accordance with the method of claim
 12. 17. Anon-transitory computer readable medium storing instructions, which whenexecuted, perform the method of claim
 12. 18. A non-contact measurementapparatus as claimed in claim 1, in which the coordinate positioningapparatus is a coordinate measuring machine.
 19. A non-contactmeasurement apparatus as claimed in claim 1, in which the coordinatepositioning apparatus is a machine tool.
 20. A non-contact measurementapparatus as claimed in claim 1, in which the probe is mounted on anarticulated probe head comprising at least one rotational axis.
 21. Anon-contact measurement apparatus as claimed in claim 20, in which thearticulated probe head comprises at least two rotational axes.
 22. Anon-contact measurement apparatus as claimed in claim 20, in which thecoordinate positioning apparatus comprises a base for the object, aframe on which a quill is mounted which can be moved along threemutually orthogonal axes and on which the articulated probe head ismounted.
 23. A method as claimed in claim 12, in which the obtainingtopographical data step comprises analysis of at least one of the atleast one first image and the at least one second image.
 24. A method asclaimed in claim 12, in which the method comprises processing a set ofimages in which the position of an optical pattern on the object isdifferent for each image in the set in order to determine thetopographical data.
 25. A method as claimed in claim 12, in which themethod comprises identifying an irregularity in an optical patternprojected on the object in each of the first and second images as the atleast one common photogrammetric target feature.
 26. A method as claimedin claim 25, in which the method comprises: processing a set of firstimages obtained by the imaging device from the first perspective, theposition of an optical pattern projected onto the object being differentfor each image in the set; and processing a set of second imagesobtained by the imaging device from the second perspective, the positionof an optical pattern projected onto the object being different for eachimage in the set, in order to identify the at least one commonphotogrammetric target feature on the object to be measured and todetermine the position of the common photogrammetric target feature onthe object relative to an image sensor of the imaging device.
 27. Amethod as claimed in claim 26, in which the method comprises processingat least one of the first or second sets of images in order to determinethe topographical data.
 28. A method as claimed in claim 27, in whichthe method comprises calculating at least one of a first phase map fromthe set of first images and a second phase map from the set of secondimages.
 29. A method as claimed in claim 28, in which the methodcomprises determining the topographical data from at least one of the atleast one first phase map and second phase map.
 30. A method as claimedin claim 15, in which the projector has a fixed optical pattern.
 31. Amethod as claimed in claim 12, in which the probe is mounted on acoordinate positioning apparatus.
 32. A method as claimed in claim 31,in which the coordinate positioning apparatus is a coordinate measuringmachine.
 33. A method as claimed in claim 31, in which the coordinatepositioning apparatus is a machine tool.
 34. A method as claimed inclaim 31, in which the coordinate positioning apparatus comprises a basefor the object, a frame on which a quill is mounted which can be movedalong three mutually orthogonal axes and on which an articulated probehead is mounted.
 35. A method as claimed in claim 12, in which the probeis mounted on an articulated probe head comprising at least onerotational axis.
 36. A method as claimed in claim 35, in which thearticulated probe head comprises at least two rotational axes.